package moxl.xpath.axes;

import moxl.dom.MoxlNode;
import moxl.xpath.parser.types.NodeTestMatcher;

public class DescendantAxisStrategy implements XPathAxisStrategy
{
	public Iterable<MoxlNode> getNodes(MoxlNode contextNode, NodeTestMatcher matcher) throws InvalidAxisForNodeException
	{
		DescendantElementCollector visitor = new DescendantElementCollector(matcher);
		contextNode.accept(visitor);
		return visitor.getNodesIterable();
	}

}
